package com.doubledr.light_lock.Task;

import android.content.Context;

import com.doubledr.light_lock.R;
import com.doubledr.light_lock.utils.PathManager;

import java.util.Calendar;

public class TaskBuilder {

    public  static  String[] getTaskParams(Context context,String orgFilePath){
        //构造任务参数
        String targetFilePath = PathManager.getFilePath(context,"files_lock/"+context.getString(R.string.en_folder));
        System.out.println(targetFilePath);
        System.out.println(orgFilePath);

        Calendar cal = Calendar.getInstance();
        int year = cal.get(Calendar.YEAR);
        int month = cal.get(Calendar.MONTH)+1;
        int day = cal.get(Calendar.DAY_OF_MONTH);
        int hour = cal.get(Calendar.HOUR);
        int min = cal.get(Calendar.MINUTE);
        int sec = cal.get(Calendar.SECOND);
        String orgFileName = year+""+month+""+day+""+hour+""+min+""+sec;
        orgFileName = "files_lock_"+ orgFileName;

        String[] strings = {orgFilePath,targetFilePath+"/"+orgFileName+".ept"};
        return strings;
    }
}
